<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.com">
	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--引入layui.css -->
		<link rel="stylesheet" href="/layui/css/layui.css"/>
		<!--引入layui.js -->
		<script type="text/javascript" src="/layui/layui.js"></script>
	</head>
	<body>
		<h5 align="center" style="font-size: 32px"><b>教师代课课程</b></h5>
		
		<table class="layui-table">
			<tr>
				<td>全选</td>
				<td>课程id</td>
				<td>课程名称</td>
				<td>课程说明</td>
				<td>学分</td>
				<td>课时</td>
				<td>最大选课人数</td>
				<td>已选人数</td>
				<td>学生列表</td>
			</tr>
			<tr th:each="course:${pageHelper.list}">
				<td><input type="checkbox"/></td>
				<td th:text="${course.c_id}">1</td>
				<td th:text="${course.c_name}">Java程序设计</td>
				<td th:text="${course.c_desc}">入门</td>
				<td th:text="${course.c_score}">3</td>
				<td th:text="${course.c_time}">48</td>
				<td th:text="${course.c_maxnum}">60</td>
				<td th:text="${course.c_num}">0</td>
				<td>
					<a th:href="'/student/list?pageNum=1&Cid='+${course.c_id}" class="layui-btn layui-btn-radius layui-btn-normal layui-btn layui-btn-sm">
						<i class="layui-icon layui-icon-friends"></i>
						查看
					</a>
				</td>
				
			</tr>
			<tr th:each="course,stat:${pageHelper.list}" th:if="${stat.index == 0}">
				<td colspan="9">
					<a th:href="'/course/list?pageNum=1&Tid='+${course.t_id}">首页</a>
					|
					<a th:if="${pageHelper.pageNum>1}"th:href="'/course/list?pageNum='+${pageHelper.pageNum-1}+'&Tid='+${course.t_id}">上一页</a>
					<label th:if="${pageHelper.pageNum==1}" style="color: gray">上一页</label>
					|
					当前第<label th:text="${pageHelper.pageNum}"></label>页
					/
					共<label th:text="${pageHelper.pageCount}"></label>页
					|
					<a th:if="${pageHelper.pageNum<pageHelper.pageCount}"th:href="'/course/list?pageNum='+${pageHelper.pageNum+1}+'&Tid='+${course.t_id}">下一页</a>
					<label th:if="${pageHelper.pageNum==pageHelper.pageCount}">下一页</label>
					|
					<a th:href="'/course/list?pageNum='+${pageHelper.pageCount}+'&Tid='+${course.t_id}">尾页</a>
				</td>
			</tr>
		</table>
		
	</body>
</html>
